<?php
use \GatewayWorker\Lib\Gateway;


class cmd_exitroom extends cmdbase
{
	public function onCmd($msg){
		$group_mgr = $GLOBALS['GroupMgr'];
		$msg_body = new exitroom_rsp();

		//退出组
		if($group_mgr->leaveGroup()){
			$msg_body->ret = NetErrorCode::None;
			$msg_body->reason = "success";
		}else{
			$msg_body->ret = NetErrorCode::Error;
			$msg_body->reason = "failed";
        }

 		return $msg_body;
	}
}